package com.lanou.myapplication;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

/**
 * Created by dllo on 15/10/22.
 */
public class LoginActivity extends Activity implements View.OnClickListener {
     private Button registerBtn,loginBtn;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.avtivity_login);
        init();
    }

    private void init() {
      registerBtn=(Button)findViewById(R.id.registerBtn);
        registerBtn.setOnClickListener(this);
        loginBtn=(Button)findViewById(R.id.loginBtn);
        loginBtn.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.registerBtn:
                Intent intent =new Intent(this,RegisterActivity.class);
                startActivity(intent);
            case R.id.loginBtn:
                Intent intent1 =new Intent(this,MainActivity.class);
                startActivity(intent1);
        }
    }
}


